package com.example.demo.base.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum Meta {
    SUCCESS(200, "操作成功"),
    TokenExpire(401, "请登录!"),
    HasCollection(500, "已收藏"),
    StarNOTExist(500, "演员不存在"),
    MovieNOTExist(500, "电影不存在"),
    TypeNOTExist(500, "选项不存在"),
    MashExist(500, "番号已存在"),
    CollectionNotExist(500, "收藏不存在"),
    SecCodeNotEnough(500, "安全码为6位"),
    SecCodeExist(500, "安全码已有"),
    SecOldCodeErr(500, "旧安全码错误"),
    VerifyCodeDue(500, "验证码已过期！"),
    SplashAdErr(500, "广告没有！"),
    MashErr(500, "番号不能为空！"),
    HasUpErr(500, "你已经点过了！"),
    MashFormatErr(500, "番号格式为字母加数字加-"),
    PhoneNotRegister(10004, "该手机号未注册！"),
    PhoneHasExist(500, "手机号已存在"),
    PhoneHasEqual(500, "手机号与原来的相同"),
    PhoneHasEqualErr(500, "解绑手机号错误"),
    FileUploadFile(500, "文件上传失败"),
    PhoneNumErr(10004, "手机号位数错误！"),
    VerifyCodeError(10005, "验证码错误！"),
    PhoneAndPwdError(10006, "用户名或密码错误！"),
    UserExistError(10007, "用户已存在！"),
    ServerError(500, "服务器错误!");

    private int code;
    private String message;

    Meta(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    @Override
    public String toString() {
        return "code="+code+" message="+message;
    }
}
